﻿@model Yeap.Models.WidgetColumns

@{
    ViewBag.Title = "Yeap Welcome!";
    Layout = "~/Views/Shared/_Layout.cshtml";
    int columnCounter = 0;
}

@using Yeap.Kernel.Security
@using Yeap.Config
@using Yeap.Kernel.Utils.Extensions

<div class="MainContentDiv">

    @foreach (var column in Model.Columns) 
    {
        <div class="columnStruct" @Model.GetStyleAttribute(columnCounter++)  >
        
            @foreach (var widget in column) 
            {
             
                <div class="widget">
                
                    <div class="widgetHeader">
                    
                        <div>@widget.WidgetUserFriendlyName</div>

                    </div>

                    <div class="widgetBody">
                    
                        @{
                            Html.RenderAction( widget.WidgetName, Constants.Controllers.Widget, widget.Parameters.ToRouteValueDictionary() );
                         }

                    </div>

                </div>    
                   
            }

        </div>
        
           
    }

</div>
